package com.lyz.dataStructure.algorithm.流利说2020;/**
 * @Author:759057893@qq.com Lyz
 * @Date: ${Date} 18:55
 * @Description:
 **/

import java.util.Scanner;

/**
 *@Author:759057893@qq.com Lyz
 *@Date: 2019/8/19 18:55
 *@Description:
 **/
public class Main2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        System.out.println(louti(N));
    }
    public static Long louti(Long n){

        if(n<=2){
            return n;
        }
        long pre2 =1,pre1 = 2;
        long result = 1;
        for(int i =3;i<=n;i++){
            result = pre2+pre1;
            pre2 = pre1;
            pre1 = result;
        }
        return  result;
    }
}
